<?php 
	namespace Home\Model;
	use Think\Model;

	class PictureModel extends Model
	{
		protected $trueTableName = "picture";

		public function get_pic($program_id)
		{
			// dump($program_id);exit(); //节目id
			$sql = "SELECT a.file_url,b.cp_type FROM picture_info as a JOIN picture as b on b.picture_id = a.id WHERE b.parent_id =" .$program_id;
			$res = M()->query($sql);
			return $res?$res:"";
		}
	}